package cn.edu.neusoft.maxingxin231.yuejian06.Model;

import java.util.List;

import cn.edu.neusoft.maxingxin231.yuejian06.Bean.OrderListBean;
import cn.edu.neusoft.maxingxin231.yuejian06.Iface.OrderListIface;
import cn.edu.neusoft.maxingxin231.yuejian06.Listener.ListListener;
import cn.edu.neusoft.maxingxin231.yuejian06.Service.LoginService;
import retrofit2.Call;
import retrofit2.Retrofit;

public class OrderListModel extends RetrofitBaseModel implements OrderListIface<OrderListBean> {
    private LoginService loginService;
    private Retrofit retrofit;

    public OrderListModel(){
        retrofit = getRetrofit();
        loginService = getLoginService();
    }
    @Override
    public void getOrderList(String user_id, ListListener<OrderListBean> listListener) {
        Call<List<OrderListBean>>  call=loginService.allorder(user_id);
        callenqueueList(call,listListener);
    }

    @Override
    public void getFinishOrder(String user_id, ListListener<OrderListBean> listListener) {
        Call<List<OrderListBean>>  call=loginService.finishorder(user_id);
        callenqueueList(call,listListener);
    }

    @Override
    public void getUnFinishOrder(String user_id, ListListener<OrderListBean> listListener) {
        Call<List<OrderListBean>>  call=loginService.unfinishorder(user_id);
        callenqueueList(call,listListener);
    }
}
